package com.bawei.wyg.mycommerce.databinding.bind;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import android.os.Bundle;
import android.widget.Toast;

import com.bawei.wyg.mycommerce.R;
import com.bawei.wyg.mycommerce.databinding.ActivityBindBinding;
import com.bawei.wyg.mycommerce.databinding.single.SingleEntity;

public class BindActivity extends AppCompatActivity {
    SingleEntity singleEntity;
    ActivityBindBinding bindBinding;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_bind);
        bindBinding= DataBindingUtil.setContentView(this,R.layout.activity_bind);
        singleEntity=new SingleEntity();
        bindBinding.setEntity(singleEntity);
        bindBinding.setSingleClick(new SingleClick());
    }
    public class SingleClick{
        public void btnClick(){
//            singleEntity.setContent("我是猫晴呐~");
            Toast.makeText(BindActivity.this, ""+singleEntity.getContent(), Toast.LENGTH_SHORT).show();
        }
    }
}